package com.bst.bsj.bops.web.biz.impl;


import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bst.bsj.bops.web.biz.SeedlingNamesConfigAndTypeRelationService;
import com.bst.bsj.common.dal.daointerface.SeedlingNamesConfigAndTypeRelationDAO;
import com.bst.bsj.common.dal.dataobject.SeedlingNamesConfigAndTypeRelation;

@Service("seedlingNamesConfigAndTypeRelationService")
public class SeedlingNamesConfigAndTypeRelationServiceImpl implements SeedlingNamesConfigAndTypeRelationService {

  private static final Log logger = LogFactory.getLog(SeedlingNamesConfigAndTypeRelationServiceImpl.class);

  @Autowired
  private SeedlingNamesConfigAndTypeRelationDAO andTypeRelationDAO;

  @Override
  public int delete(Long id) {
    int lid = 0;
    try {
      lid = andTypeRelationDAO.delete(id);
    } catch (Exception e) {
      logger.error("SeedlingNamesConfigAndTypeRelationServiceImpl.delete(banner) error!", e);
    }
    return lid;
  }

  @Override
  public void insert(SeedlingNamesConfigAndTypeRelation andTypeRelation) {
    try {
      andTypeRelationDAO.insert(andTypeRelation);
    } catch (Exception e) {
      logger.error("SeedlingNamesConfigAndTypeRelationServiceImpl.insert(banner) error!", e);
    }
  }

}
